Skip to content

Rollup of 9 pull requests#154519

Closed
JonathanBrouwer wants to merge 21 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-UbyOswV
Closed

Rollup of 9 pull requests#154519
JonathanBrouwer wants to merge 21 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-UbyOswV

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

homersimpsons and others added 21 commits March 4, 2026 01:25
Add `bounds::FloatPrimitive`

Exhaustive float pattern match

Fix GCC

use span bugs
This create conflict if the timespec of a target has additional fields.
Use libc::timespec::default() instead
stabilizes `core::range::RangeFrom`
stabilizes `core::range::RangeFromIter`

add examples for `remainder` method on range iterators
`RangeFromIter::remainder` was not stabilized (see issue 154458)
…gross35

Update libc to v0.2.183

Follow-up of rust-lang#150484.
This PR updates libc to include the latest patches to make rtems target (and probably others) compile again.
…, r=tgross35

stabilize new RangeFrom type and iterator

```rust
// in core and std
pub mod range;

// in core::range

pub struct RangeFrom<Idx> {
    pub start: Idx,
}

impl<Idx: fmt::Debug> fmt::Debug for RangeFrom<Idx> { /* ... */ }

impl<Idx: PartialOrd<Idx>> RangeFrom<Idx> {
    pub const fn contains<U>(&self, item: &U) -> bool
    where
        Idx: [const] PartialOrd<U>,
        U: ?Sized + [const] PartialOrd<Idx>;
}

impl<Idx: Step> RangeFrom<Idx> {
    pub fn iter(&self) -> RangeFromIter<Idx>;
}

impl<T> const RangeBounds<T> for RangeFrom<T> { /* ... */ }
impl<T> const RangeBounds<T> for RangeFrom<&T> { /* ... */ }

impl<T> const From<RangeFrom<T>> for legacy::RangeFrom<T> { /* ... */ }
impl<T> const From<legacy::RangeFrom<T>> for RangeFrom<T> { /* ... */ }

pub struct RangeFromIter<A>(/* ... */);

// `RangeFromIter::remainder` left unstable

impl<A: Step> Iterator for RangeFromIter<A> {
    type Item = A;
    /* ... */
}

impl<A: Step> FusedIterator for RangeFromIter<A> { }
impl<A: Step> IntoIterator for RangeFrom<A> {
    type Item = A;
    type IntoIter = RangeFromIter<A>;
    /* ... */
}

unsafe impl<T> const SliceIndex<[T]> for range::RangeFrom<usize> {
    type Output = [T];
    /* ... */
}
unsafe impl const SliceIndex<str> for range::RangeFrom<usize> {
    type Output = str;
    /* ... */
}

impl ops::Index<range::RangeFrom<usize>> for CStr {
    type Output = CStr;
    /* ... */
}
```

Tracking issue: rust-lang#125687
…tgross35,RalfJung

Merge `fabsf16/32/64/128` into `fabs::<F>`

Following [a small conversation on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Float.20intrinsics/with/521501401) (and because I'd be interested in starting to contribute on Rust), I thought I'd give a try at merging the float intrinsics :)

This PR just merges `fabsf16`, `fabsf32`, `fabsf64`, `fabsf128`, as it felt like an easy first target.

Notes:
- I'm opening the PR for one intrinsic as it's probably easier if the shift is done one intrinsic at a time, but let me know if you'd rather I do several at a time to reduce the number of PRs.
- Currently this PR increases LOCs, despite being an attempt at simplifying the intrinsics/compilers. I believe this increase is a one time thing as I had to define new functions and move some things around, and hopefully future PRs/commits will reduce overall LoCs
- `fabsf32` and `fabsf64` are `#[rustc_intrinsic_const_stable_indirect]`, while `fabsf16` and `fabsf128` aren't; because `f32`/`f64` expect the function to be const, the generic version must be made indirectly stable too. We'd need to check with T-lang this change is ok; the only other intrinsics where there is such a mismatch is `minnum`, `maxnum` and `copysign`.
- I haven't touched libm because I'm not familiar with how it works; any guidance would be welcome!
…alebzulawski,antoyo

simd_fmin/fmax: make semantics and name consistent with scalar intrinsics

This is the SIMD version of rust-lang#153343: change the documented semantics of the SIMD float min/max intrinsics to that of the scalar intrinsics, and also make the name consistent. The overall semantic change this amounts to is that we restrict the non-determinism: the old semantics effectively mean "when one input is an SNaN, the result non-deterministically is a NaN or the other input"; the new semantics say that in this case the other input must be returned. For all other cases, old and new semantics are equivalent. This means all users of these intrinsics that were correct with the old semantics are still correct: the overall set of possible behaviors has become smaller, no new possible behaviors are being added.

In terms of providers of this API:
- Miri, GCC, and cranelift already implement the new semantics, so no changes are needed.
- LLVM is adjusted to use `minimumnum nsz` instead of `minnum`, thus giving us the new semantics.

In terms of consumers of this API:
- Portable SIMD almost certainly wants to match the scalar behavior, so this is strictly a bugfix here.
- Stdarch mostly stopped using the intrinsic, except on nvptx, where arguably the new semantics are closer to what we actually want than the old semantics (rust-lang/stdarch#2056).

Q: Should there be an `f` in the intrinsic name to indicate that it is for floats? E.g., `simd_fminimum_number_nsz`?

Also see rust-lang#153395.
…ark-Simulacrum

triagebot: add reminder for bumping CI LLVM stamp

I'm not sure what else can be done automatically to help us not forget this, but at least this gives a chance for the PR author/reviewer to be reminded (e.g. myself).
…alueFormat-dist-x86_64, r=marcoieni

Fix LegacyKeyValueFormat report from docker build: dist-x86_64

Part of rust-lang#152305

r? @marcoieni
…s, r=Mark-Simulacrum

`trim_prefix` for paths

under rust-lang#142312?

its a useful method.
…triddle

Fix ice in rustdoc of private reexport

Fixes rust-lang#154383

The root cause is rustdoc could still try to resolve links for source docs that resolver did not cache in `ResolveDocLinks::Exported` mode. The test case will not crash with `--document-private-items` option, which will use `ResolveDocLinks::All`.

The fix makes rustdoc skip link resolution based on the source `DefId` of each doc fragment, so its behavior stays aligned with resolver's logic here: https://github.com/chenyukang/rust/blob/dc5cb1719eed6ac9275fe93d914d32141606b2ac/compiler/rustc_resolve/src/late.rs#L685
Notify stdarch maintainers on changes in std_detect

cc @Amanieu @folkertdev @Kobzol

It would be nice to be notified when std_detect changes, as it is spiritually a part of stdarch.

Also assign @rust-lang/libs to std_detect
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Mar 28, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Mar 28, 2026
@rustbot rustbot added T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 28, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 28, 2026

📌 Commit 3dc87d6 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 28, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

Trying commonly failed jobs
@bors try jobs=test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Mar 28, 2026
Rollup of 9 pull requests


try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Mar 28, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #150752 (Update libc to v0.2.183)
 - #153380 (stabilize new RangeFrom type and iterator)
 - #153834 (Merge `fabsf16/32/64/128` into `fabs::<F>`)
 - #154043 (simd_fmin/fmax: make semantics and name consistent with scalar intrinsics)
 - #154494 (triagebot: add reminder for bumping CI LLVM stamp)
 - #153374 (Fix LegacyKeyValueFormat report from docker build: dist-x86_64)
 - #154320 (`trim_prefix` for paths)
 - #154453 (Fix ice in rustdoc of private reexport)
 - #154515 (Notify stdarch maintainers on changes in std_detect)
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job dist-various-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

error[E0425]: cannot find type `Duration` in this scope
  --> /rustc/babfce889d43ad9116b22fd343f53df0a23cef21/library/std/src/sys/time/unsupported.rs:14:66
   |
14 |     pub fn checked_sub_instant(&self, other: &Instant) -> Option<Duration> {
   |                                                                  ^^^^^^^^ not found in this scope
   |
help: consider importing one of these structs
   |
 1 + use crate::time::Duration;
   |
 1 + use core::time::Duration;
   |

error[E0425]: cannot find type `Duration` in this scope
  --> /rustc/babfce889d43ad9116b22fd343f53df0a23cef21/library/std/src/sys/time/unsupported.rs:18:48
   |
18 |     pub fn checked_add_duration(&self, other: &Duration) -> Option<Instant> {
   |                                                ^^^^^^^^ not found in this scope
   |
help: consider importing one of these structs
   |
 1 + use crate::time::Duration;
   |
 1 + use core::time::Duration;
   |

error[E0425]: cannot find type `Duration` in this scope
  --> /rustc/babfce889d43ad9116b22fd343f53df0a23cef21/library/std/src/sys/time/unsupported.rs:22:48
   |
22 |     pub fn checked_sub_duration(&self, other: &Duration) -> Option<Instant> {
   |                                                ^^^^^^^^ not found in this scope
   |
help: consider importing one of these structs
   |
 1 + use crate::time::Duration;
   |
 1 + use core::time::Duration;
   |

error[E0433]: cannot find type `Duration` in this scope
  --> /rustc/babfce889d43ad9116b22fd343f53df0a23cef21/library/std/src/sys/time/unsupported.rs:28:44
   |
28 |     pub const MAX: SystemTime = SystemTime(Duration::MAX);
   |                                            ^^^^^^^^ use of undeclared type `Duration`
   |
help: consider importing one of these structs
   |
 1 + use crate::time::Duration;
   |
 1 + use core::time::Duration;
   |

error[E0433]: cannot find type `Duration` in this scope
  --> /rustc/babfce889d43ad9116b22fd343f53df0a23cef21/library/std/src/sys/time/unsupported.rs:30:44
   |
30 |     pub const MIN: SystemTime = SystemTime(Duration::ZERO);
   |                                            ^^^^^^^^ use of undeclared type `Duration`
   |
help: consider importing one of these structs
   |
 1 + use crate::time::Duration;
   |
 1 + use core::time::Duration;
   |

error[E0425]: cannot find type `Duration` in this scope
  --> /rustc/babfce889d43ad9116b22fd343f53df0a23cef21/library/std/src/sys/time/unsupported.rs:36:58
   |
36 |     pub fn sub_time(&self, other: &SystemTime) -> Result<Duration, Duration> {
   |                                                          ^^^^^^^^ not found in this scope
   |
help: consider importing one of these structs
   |
 1 + use crate::time::Duration;
   |
 1 + use core::time::Duration;
   |

error[E0425]: cannot find type `Duration` in this scope
  --> /rustc/babfce889d43ad9116b22fd343f53df0a23cef21/library/std/src/sys/time/unsupported.rs:36:68
   |
36 |     pub fn sub_time(&self, other: &SystemTime) -> Result<Duration, Duration> {
   |                                                                    ^^^^^^^^ not found in this scope
   |
help: consider importing one of these structs
   |
 1 + use crate::time::Duration;
   |
 1 + use core::time::Duration;
   |

error[E0425]: cannot find type `Duration` in this scope
  --> /rustc/babfce889d43ad9116b22fd343f53df0a23cef21/library/std/src/sys/time/unsupported.rs:40:48
   |
40 |     pub fn checked_add_duration(&self, other: &Duration) -> Option<SystemTime> {
   |                                                ^^^^^^^^ not found in this scope
   |
help: consider importing one of these structs
   |
 1 + use crate::time::Duration;
   |
 1 + use core::time::Duration;
   |

error[E0425]: cannot find type `Duration` in this scope
  --> /rustc/babfce889d43ad9116b22fd343f53df0a23cef21/library/std/src/sys/time/unsupported.rs:44:48
   |
44 |     pub fn checked_sub_duration(&self, other: &Duration) -> Option<SystemTime> {
   |                                                ^^^^^^^^ not found in this scope
   |
help: consider importing one of these structs
   |
 1 + use crate::time::Duration;

@rust-bors rust-bors bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 28, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 28, 2026

💔 Test for babfce8 failed: CI. Failed job:

@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 28, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 28, 2026

PR #150752, which is a member of this rollup, was unapproved.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 28, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 29, 2026

☀️ Try build successful (CI)
Build commit: d88b280 (d88b2807f8fbaced951239ca7d9d45d42779bea7, parent: fb27476aaf1012f1f6ace6306f9b990e0d989c31)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.